<?php if(!class_exists('raintpl')){exit;}?><?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("header") . ( substr("header",-1,1) != "/" ? "/" : "" ) . basename("header") );?>
<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("navigator") . ( substr("navigator",-1,1) != "/" ? "/" : "" ) . basename("navigator") );?>

<div id = "container">
	<h1 class = "header">จัดการข้อมูลผู้ใช้งานระบบ</h1>

	<form action = '<?php echo $action;?>' method = 'post' enctype='multipart/form-data' id = "admin-form">
		<input type = "hidden" name = "uid" value = "<?php echo $uid;?>">
		<ul class = 'form'>
			<li class = 'node'>
				<label for='username' class = 'label'>ชื่อผู้ใช้งาน : </label>
				<input type = 'text' id = 'username' class = 'input validate[required] text-input w200' name = 'username' value = "<?php echo $admin['username'];?>">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='password' class = 'label'>รหัสผ่าน : </label>
				<input type = 'password' id = 'password' class = 'input validate[required] text-input w200' name = 'password' value = "<?php echo $admin['password'];?>">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='name' class = 'label'>ชื่อ นามสกุล : </label>
				<input type = 'text' id = 'name' class = 'input validate[required] text-input w200' name = 'name' value = "<?php echo $admin['name'];?>">
				<span class='require'>*</span>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='level_name' class = 'label'>ตำแหน่ง : </label>
				<select name = 'level_name'>
					<option value = 'admin' <?php if( $admin['level_name']=='admin' ){ ?>selected<?php } ?>>Admin</option>
					<option value = 'board' <?php if( $admin['level_name']=='board' ){ ?>selected<?php } ?>>Board</option>
					<option value = 'officer' <?php if( $admin['level_name']=='officer' ){ ?>selected<?php } ?>>Officer</option>
					<option value = 'assessor' <?php if( $admin['level_name']=='assessor' ){ ?>selected<?php } ?>>Assessor</option>
				</select>
				<span class = 'desc'></span>
			</li>
			<li class = 'node'>
				<label for='tel' class = 'label'>เบอร์โทรศัพท์ : </label>
				<input type = 'text' id = 'tel' class = 'input w200' name = 'tel' value = "<?php echo $admin['tel'];?>">
			</li>
			<li class = 'node'>
				<label for='email' class = 'label'>อีเมลล์ : </label>
				<input type = 'text' id = 'email' class = 'input w200' name = 'email' value = "<?php echo $admin['email'];?>">
			</li>
			<li>
				<input type = 'submit' value = ' ตกลง ' class = 'submit'>
				<input type = 'button' value = ' ยกเลิก ' class = 'submit' onclick = "location.href='admin.php'">
			</li>
		</ul>
	</form>
</div>

<?php $tpl = new RainTPL;$tpl_dir_temp = self::$tpl_dir;$tpl->assign( $this->var );$tpl->draw( dirname("footer") . ( substr("footer",-1,1) != "/" ? "/" : "" ) . basename("footer") );?>